package com.bdsoft.service.impl;

import java.util.List;

import com.bdsoft.domain.UmsMember;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bdsoft.mapper.UmsMemberMapper;

import com.bdsoft.service.IUmsMemberService;

/**
 * 会员管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-29
 */
@Service
public class UmsMemberServiceImpl implements IUmsMemberService 
{
    @Autowired
    private UmsMemberMapper umsMemberMapper;

    /**
     * 查询会员管理
     * 
     * @param id 会员管理主键
     * @return 会员管理
     */
    @Override
    public UmsMember selectUmsMemberById(Long id)
    {
        return umsMemberMapper.selectUmsMemberById(id);
    }

    @Override
    public UmsMember selectUmsMemberByUsername(String username) {
        return umsMemberMapper.selectUmsMemberByUsername(username);
    }

    /**
     * 查询会员管理列表
     * 
     * @param umsMember 会员管理
     * @return 会员管理
     */
    @Override
    public List<UmsMember> selectUmsMemberList(UmsMember umsMember)
    {
        return umsMemberMapper.selectUmsMemberList(umsMember);
    }

    /**
     * 新增会员管理
     * 
     * @param umsMember 会员管理
     * @return 结果
     */
    @Override
    public int insertUmsMember(UmsMember umsMember)
    {
        umsMember.setCreateTime(DateUtils.getNowDate());
        return umsMemberMapper.insertUmsMember(umsMember);
    }

    /**
     * 修改会员管理
     * 
     * @param umsMember 会员管理
     * @return 结果
     */
    @Override
    public int updateUmsMember(UmsMember umsMember)
    {
        umsMember.setUpdateTime(DateUtils.getNowDate());
        return umsMemberMapper.updateUmsMember(umsMember);
    }

    /**
     * 批量删除会员管理
     * 
     * @param ids 需要删除的会员管理主键
     * @return 结果
     */
    @Override
    public int deleteUmsMemberByIds(Long[] ids)
    {
        return umsMemberMapper.deleteUmsMemberByIds(ids);
    }

    /**
     * 删除会员管理信息
     * 
     * @param id 会员管理主键
     * @return 结果
     */
    @Override
    public int deleteUmsMemberById(Long id)
    {
        return umsMemberMapper.deleteUmsMemberById(id);
    }
}
